<template>
	<view class="input">
		<view class="input-frame">
			<input v-model="user.userid" class="uni-input" focus placeholder="用户名" @input="enter"/>
		</view>
		<view class="input-frame">
			<input v-model="user.psword" class="uni-input" placeholder="请输入密码" password  @input="enter"/>
		</view>

	</view>

</template>

<script>
	import axios from 'axios'
	export default {
		name: 'startframe',
		data() {
			return {
				user: {
				userid: '',
				psword: '',					
				}

			}
		},
		props: {
			userid: '',
		},
		methods: {
			changeid1: function() {
				return this.userid = 0;

			},
			changeid2: function() {
				// childByValue是在父组件on监听的方法
				// 第二个参数this.userid是需要传的值
				return this.userid = 1;


			},
			enter: function() {
				this.$emit('enter',this.user);
			},


		}
	}
</script>

<style scoped>
	.input {}

	.input-frame {
		display: inline-block;
		text-align: center;
		box-shadow:1px 1px 5px gray;
		width: 70%;
		position: relative;
		top: 10rpx;
		margin-left: 15%;
	}
</style>